package com.lyj.friend.controller.question;

import com.lyj.common.core.controller.BaseController;
import com.lyj.common.core.domain.R;
import com.lyj.common.core.domain.TableDataInfo;
import com.lyj.friend.domain.question.dto.QuestionQueryDTO;
import com.lyj.friend.domain.question.vo.QuestionDetailVO;
import com.lyj.friend.service.question.QuestionService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LIUYANJIAO
 * Date: 2025-09-12
 * Time: 16:52
 */
@RestController
@RequestMapping("/question")
public class QuestionController extends BaseController {
    @Resource(name = "questionServiceImpl")
    private QuestionService questionService;

    @GetMapping("/semiLogin/list")
    public TableDataInfo list(QuestionQueryDTO questionQueryDTO) {
        return questionService.list(questionQueryDTO);
    }

    @GetMapping("/detail")
    public R<QuestionDetailVO> detail(Long questionId) {
        return R.ok(questionService.detail(questionId));
    }

    @GetMapping("/preQuestion")
    public R<String> preQuestion(Long questionId) {
        return R.ok(questionService.preQuestion(questionId));
    }

    @GetMapping("/nextQuestion")
    public R<String> nextQuestion(Long questionId) {
        return R.ok(questionService.nextQuestion(questionId));
    }
    //TODO  热门榜单
}

